home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / lisp / eulisp / you-075a.lha / you-075a / allocate.h < prev    next >
C/C++ Source or Header  |  1992-06-18  |  3KB  |  89 lines

  1. /* ******************************************************************** */
  2. /*  allocate.h       Copyright (C) Codemist and University of Bath 1989 */
  3. /*                                                                      */
  4. /* Space allocation                                            */
  5. /* ******************************************************************** */
  6.  
  7. /*
  8.  * $Id: allocate.h,v 1.5 1992/06/09 13:47:32 pab Exp $
  9.  *
  10.  * $Log: allocate.h,v $
  11.  * Revision 1.5  1992/06/09  13:47:32  pab
  12.  * fixed includes
  13.  *
  14.  * Revision 1.4  1992/05/28  11:18:38  pab
  15.  * more defines
  16.  *
  17.  * Revision 1.5  1992/02/10  12:13:38  pab
  18.  * removed redundant code
  19.  *
  20.  * Revision 1.4  1992/01/17  22:27:39  pab
  21.  * Added alloc_nconses
  22.  *
  23.  * Revision 1.2  1991/09/11  12:06:58  pab
  24.  * 11/9/91 First Alpha release of modified system
  25.  *
  26.  * Revision 1.1  1991/08/12  16:49:23  pab
  27.  * Initial revision
  28.  *
  29.  * Revision 1.5  1991/02/14  02:13:54  kjp
  30.  * Redid header.
  31.  *
  32.  */
  33.  
  34. #define ALIGN_SIZE(s) \
  35.          ((s)+((s)%BYTE_ALIGNMENT == 0 \
  36.            ? 0 \
  37.            : BYTE_ALIGNMENT-(s)%BYTE_ALIGNMENT))
  38.  
  39. extern int pagesize;
  40. /* A sick method to catch GC bugs... */
  41. #define HUNK_PAGE_SIZE() 512
  42. /** (pagesize= (pagesize+64)%1221 + 1) **/
  43. /* Allocator function signatures... */
  44.  
  45. extern LispObject allocate_module_function(LispObject*,LispObject,LispObject,
  46.                     LispObject (*)(LispObject*),int);
  47. extern LispObject allocate_i_module(LispObject*,LispObject);
  48. extern LispObject allocate_i_function(LispObject*,LispObject,LispObject,int);
  49. extern LispObject allocate_buffered_continue(void);
  50. extern LispObject allocate_special(LispObject*,LispObject,LispObject (*)());
  51. extern LispObject allocate_generic(LispObject,int);
  52.  
  53. extern LispObject allocate_semaphore(LispObject*);
  54. extern LispObject allocate_thread(LispObject*,int,int, int);
  55. extern LispObject allocate_n_conses(LispObject *, int);
  56.  
  57. #if (defined(WITH_BSD_SOCKETS) || defined(WITH_SYSTEMV_SOCKETS))
  58.  
  59. extern LispObject allocate_listener(LispObject*);
  60. extern LispObject allocate_socket(LispObject*);
  61.  
  62. #endif
  63.  
  64. extern LispObject allocate_c_object(LispObject*, int,int);
  65.  
  66. extern SystemSemaphore table_sem,symbol_sem,cons_sem,vector_sem,string_sem,
  67.   char_sem,stream_sem,integer_sem,condition_sem,continue_sem,module_sem,
  68.   class_sem,instance_sem,thread_sem;
  69.  
  70. extern SystemSemaphore env_sem;
  71.  
  72. /* Initialiser... */
  73.  
  74. extern void runtime_initialise_allocator(LispObject*);
  75. extern void runtime_reset_allocator(LispObject *);
  76.  
  77. extern char *allocate_page(LispObject*,int);
  78. extern void deallocate_page(LispObject*,char *,int);
  79.  
  80. extern char *allocate_space(LispObject*,int);
  81. extern void deallocate_space(LispObject*,char *,int);
  82. extern void promote_free_space(LispObject*);
  83.  
  84. extern char *allocate_stack(LispObject*,int);
  85. extern void free_stack(LispObject*,char *,int);
  86.  
  87. extern void allocate_static_integers(LispObject*);
  88.  
  89.